#ifndef INCL_MSGQUEUE_H
#define INCL_MSGQUEUE_H
#include "common.h"

class Messagelist
{
public:
    Messagelist(int qnum):firstNode(0),tailNode(0),curNodeNum(0),maxNodeNum(qnum)
    {};
   
    ~Messagelist(){};
    static Messagelist *getInstance()
    {
        static Messagelist ins(10);
        return &ins;
    }

private:
    int pushmsg(const Message& msgin );
    int popmsg(Message& msgout);

private:
    msgNodes *firstNode;
    msgNodes *tailNode;
    int curNodeNum;
    const int maxNodeNum;
};







#endif
